﻿@using Kaiser.Cubic.Service
@{
 
    var service = new CubicServiceClient();
    var leftCategory = service.GetNewsCategorysByParentCode("AboutCubic_English").FirstOrDefault();
}
<div class="erLeft_1">
    @if (leftCategory != null)
    {
        foreach (var item in leftCategory.children)
        {
            <div class="left_1">
                <span>
                    <img src="/images/index_60.png" /></span><a href="@if (string.IsNullOrWhiteSpace(item.CategoryUrl))
                                                                                      {
                                                                                      @:@(Url.Action("NewsList","News")+"?ctid="+item.Id)
                                                                                      }
                                                                                      else
                                                                                      {
                                                                                            @:@item.CategoryUrl
                                                                                      }">@item.CategoryName</a>
            </div>
            if (item.children != null)
            {
                foreach (var o in item.children)
                {
                    <div class="left_2">
                        <ul>
                            <li><span>
                                    <img src="/images/index_60.png" /></span><a href="@if (string.IsNullOrWhiteSpace(item.CategoryUrl))
                                                                                      {
                                                                                      @:@(Url.Action("NewsList","News")+"?ctid="+o.Id)
                                                                                      }
                                                                                      else
                                                                                      {
                                                                                            @:@item.CategoryUrl
                                                                                      }">@o.CategoryName </a></li>
                        </ul>
                    </div>
                }
            }
        }
    }
</div>
 